﻿emosWS.setSiteProperties(
{
"QuitALM": {
"PlcTag": [
""
],
"PlcName": [
""
],
"Security": {
"Plant": "",
"UserRF": "",
"GroupRF": ""
}
},
"AckALM": {
"AlarmGroups": [
""
],
"AlarmName": [
""
],
"Security": {
"Plant": "",
"UserRF": "",
"GroupRF": ""
}
},
"BreadcrumbLevel":"1",
"BreadcrumbText":"CA",
"BreadcrumbTextID":"T02_CA",
"Trends": [
""
]
}
);
var mainsvg = "mainsvg";
 setTimeout(function () {
 jsonFile = true;
 var myMsg = {
 "DiagnosisLibID" : 2,
 "PLC" : "",
 "Tag" : "",
 "DiagnosisControl" : "processDefaultPMR",
 "GroupRightIndex" : 0,
 "type": "OpenDiagnosisWindow",
 "data": {},
 "APT": true
 };
 parent.onMessage(myMsg); 
}, 800); 
$.ajax({
 url: "../../../../../content/application/encapsulated/common/js/durr.emos.apt.library.js",
 dataType: "script",
 async: false
});
$.ajax({
 url: "../../processSchemes/processSchemeScript.js",
 dataType: "script",
 async: false
});
$.getScript("../../processSchemes/processEnableScript.js");
$.getScript("../../processSchemes/pipeAnimations/animationScriptPVC.js");
function initialize() {
 emosWS.connect({onopen: onOpen});
}
function onOpen() {
 animationInitialize();
}
function animationInitialize() {
new EScriptGlobal (function(){
});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.Description"];
var textId = GetTagValueAsString(tagName);
; 
 Text = textId;;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id65'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var textId = sessionStorage.getItem("apt_AT_LastSelectedRobot");
; 
 Text = textId;;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id63'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
;
 Condition1 = state === 1;;
 Condition2 = state === 2;;
 Condition3 = state === 4;;
 Condition4 = state === 8;;
 Condition5 = state === 0;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#D2D2D2',
 'PLACEHOLDER_FILLCOLOR2' : '#24B2EA',
 'PLACEHOLDER_FILLCOLOR3' : '#A5B200',
 'PLACEHOLDER_FILLCOLOR4' : '#FFCC00',
 'PLACEHOLDER_FILLCOLOR5' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR1' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR2' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR3' : '#B53030',
 'PLACEHOLDER_STROKECOLOR4' : '#F27019',
 'PLACEHOLDER_STROKECOLOR5' : '#969696',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id64'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var valveNr = "1";
var tagState = processTags["Valve[" + valveNr + "].hmiIn.state"];
var tagActValue = processTags["Valve[" + valveNr + "].hmiIn.actValue"];
var tagValue1 = GetTagValueAsInteger(tagActValue);
var tagValue2 = GetTagValueAsInteger(tagState);
var mask = 1;
var active;
if((tagValue1 & mask) !== 0){
 active = true;
}
else{
 active = false;
}
;
 Condition1 = tagValue2 === 4;;
 Condition2 = tagValue2 === 8;;
 Condition3 = (tagValue2 === 2) && (active === true);;
 Condition4 = (tagValue2 === 2) && (active === false);;
 Condition5 = false;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : true,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#B53030',
 'PLACEHOLDER_FILLCOLOR2' : '#F27019',
 'PLACEHOLDER_FILLCOLOR3' : '#A5B200',
 'PLACEHOLDER_FILLCOLOR4' : '#D9DFE4',
 'PLACEHOLDER_FILLCOLOR5' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#D9DFE4',
 'PLACEHOLDER_STROKECOLOR1' : '#B53030',
 'PLACEHOLDER_STROKECOLOR2' : '#F27019',
 'PLACEHOLDER_STROKECOLOR3' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR4' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR5' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id87'});
new emosWS.ESClickWriteBit({'conditionFunction' : function() {
 var valveNr = "1";
var setTag = processTags["Valve[" + valveNr + "].hmiOut.set"];
var releaseTag = processTags["Valve[" + valveNr + "].hmiIn.release"];
var tagValue = GetTagValueAsInteger(releaseTag);
var mask = 1;
var releaseActive;
if((tagValue & mask) !== 0){
 releaseActive = true;
}
else{
 releaseActive = false;
}
; 
 Tag = setTag;
 BitNr = 0;
 Enabled = releaseActive;
return {Tag:Tag, BitNr:BitNr, Enabled:Enabled};
 },
 'PLACEHOLDER_FORCE' : 'Set',
 'PLACEHOLDER_BITMODE' : 'RadioButton_FieldValueToggle',
 'PLACEHOLDER_USESTROKE' : false,
 'PLACEHOLDER_USESHAND' : true,
 'PLACEHOLDER_USESHIDE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id87'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
;
 Condition1 = state === 1;;
 Condition2 = state === 2;;
 Condition3 = state === 4;;
 Condition4 = state === 8;;
 Condition5 = state === 0;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : true,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#D2D2D2',
 'PLACEHOLDER_FILLCOLOR2' : '#E8EBEF',
 'PLACEHOLDER_FILLCOLOR3' : '#C53E3E',
 'PLACEHOLDER_FILLCOLOR4' : '#F1873F',
 'PLACEHOLDER_FILLCOLOR5' : '#D2D2D2',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#D2D2D2',
 'PLACEHOLDER_STROKECOLOR1' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR2' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR3' : '#B53030',
 'PLACEHOLDER_STROKECOLOR4' : '#F27019',
 'PLACEHOLDER_STROKECOLOR5' : '#969696',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id60'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
;
 Condition1 = state === 1;;
 Condition2 = state === 2;;
 Condition3 = state === 4;;
 Condition4 = state === 8;;
 Condition5 = state === 0;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#D2D2D2',
 'PLACEHOLDER_FILLCOLOR2' : '#24B2EA',
 'PLACEHOLDER_FILLCOLOR3' : '#A5B200',
 'PLACEHOLDER_FILLCOLOR4' : '#FFCC00',
 'PLACEHOLDER_FILLCOLOR5' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR1' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR2' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR3' : '#B53030',
 'PLACEHOLDER_STROKECOLOR4' : '#F27019',
 'PLACEHOLDER_STROKECOLOR5' : '#969696',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id66'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.AutomaticMode"];
var state = GetTagValueAsBoolean(tagName);
 var condition = state;
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id67'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.ManualMode"];
var state = GetTagValueAsBoolean(tagName);
var tagNameAuto = processTags["Common[1].hmiIn.AutomaticMode"];
var stateAuto = GetTagValueAsBoolean(tagNameAuto);
 var condition = state & !stateAuto;
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id68'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var autoTagName = processTags["Common[1].hmiIn.AutomaticMode"];
var manoTagName = processTags["Common[1].hmiIn.ManualMode"];
var autoState = GetTagValueAsBoolean(autoTagName);
var manoState = GetTagValueAsBoolean(manoTagName);
 var condition = !(autoState || manoState);
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id69'});
new LanguageText({'textID' : 'T02_AT_Mode', 'target': 'id70'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var valveNr = "1";
var tagState = processTags["Valve[" + valveNr + "].hmiIn.state"];
var tagActValue = processTags["Valve[" + valveNr + "].hmiIn.actValue"];
var tagValue1 = GetTagValueAsInteger(tagActValue);
var tagValue2 = GetTagValueAsInteger(tagState);
var mask = 1;
var active;
if((tagValue1 & mask) !== 0){
 active = true;
}
else{
 active = false;
}
;
 Condition1 = tagValue2 === 4;;
 Condition2 = tagValue2 === 8;;
 Condition3 = (tagValue2 === 2) && (active === true);;
 Condition4 = (tagValue2 === 2) && (active === false);;
 Condition5 = false;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : true,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#B53030',
 'PLACEHOLDER_FILLCOLOR2' : '#F27019',
 'PLACEHOLDER_FILLCOLOR3' : '#A5B200',
 'PLACEHOLDER_FILLCOLOR4' : '#D9DFE4',
 'PLACEHOLDER_FILLCOLOR5' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#D9DFE4',
 'PLACEHOLDER_STROKECOLOR1' : '#B53030',
 'PLACEHOLDER_STROKECOLOR2' : '#F27019',
 'PLACEHOLDER_STROKECOLOR3' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR4' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR5' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id88'});
new emosWS.ESClickWriteBit({'conditionFunction' : function() {
 var valveNr = "1";
var setTag = processTags["ValveWord[" + valveNr + "].hmiOut.set"];
var releaseTag = processTags["ValveWord[" + valveNr + "].hmiIn.release"];
var tagValue = GetTagValueAsInteger(releaseTag);
var mask = 1;
var releaseActive;
if((tagValue & mask) !== 0){
 releaseActive = true;
}
else{
 releaseActive = false;
}
; 
 Tag = setTag;
 BitNr = 0;
 Enabled = releaseActive;
return {Tag:Tag, BitNr:BitNr, Enabled:Enabled};
 },
 'PLACEHOLDER_FORCE' : 'Set',
 'PLACEHOLDER_BITMODE' : 'RadioButton_FieldValueToggle',
 'PLACEHOLDER_USESTROKE' : false,
 'PLACEHOLDER_USESHAND' : true,
 'PLACEHOLDER_USESHIDE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id88'});
new emosWS.ESClickWriteBit({'conditionFunction' : function() {
 var valveNr = "1";
var setTag = processTags["Valve[" + valveNr + "].hmiOut.set"];
var releaseTag = processTags["Valve[" + valveNr + "].hmiIn.release"];
var tagValue = GetTagValueAsInteger(releaseTag);
var mask = 1;
var releaseActive;
if((tagValue & mask) !== 0){
 releaseActive = true;
}
else{
 releaseActive = false;
}
; 
 Tag = setTag;
 BitNr = 0;
 Enabled = releaseActive;
return {Tag:Tag, BitNr:BitNr, Enabled:Enabled};
 },
 'PLACEHOLDER_FORCE' : 'Set',
 'PLACEHOLDER_BITMODE' : 'RadioButton_FieldValueToggle',
 'PLACEHOLDER_USESTROKE' : false,
 'PLACEHOLDER_USESHAND' : true,
 'PLACEHOLDER_USESHIDE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id89'});
new emosWS.ESColorBlink({"conditionFunction" : function(){
var valveNr = "1";
var hmiInTagName = processTags["Valve[" + valveNr + "].hmiIn.actValue"];
var hmiOutTagName = processTags["Valve[" + valveNr + "].hmiOut.set"];
var hmiInTagValue = GetTagValueAsInteger(hmiInTagName);
var hmiOutTagValue = GetTagValueAsInteger(hmiOutTagName);
var mask = 1;
var active;
if((hmiInTagValue & mask) != (hmiOutTagValue & mask)){
 active = true;
}
else{
 active = false;
}
var condition = active && AT_enable && !TP_active && AT_Ctrl_Dev;
return condition;
},
"PLACEHOLDER_SWAP_FILLCOLOR" : false,
"PLACEHOLDER_SWAP_STROKECOLOR" : true,
"PLACEHOLDER_SWAP_VISIBILITY" : true,
"PLACEHOLDER_SWAP_USEFALSE" : true,
"PLACEHOLDER_SWAP_USEQUALITY" : false,
"PLACEHOLDER_FILLCOLORON" : '#F27019',
"PLACEHOLDER_FILLCOLOROFF" : '#EFEBE8',
"PLACEHOLDER_FILLCOLORFALSE" : '#00FF00',
"PLACEHOLDER_STROKECOLORQUALITYGOOD" : '#000000',
"PLACEHOLDER_STROKECOLORQUALITYBAD" : '#FF8000',
"PLACEHOLDER_STROKECOLORON" : '#F27019',
"PLACEHOLDER_STROKECOLOROFF" : '#6D635D',
"PLACEHOLDER_STROKECOLORFALSE" : '#00FF00',
"PLACEHOLDER_VISIBILITYON" : true,
"PLACEHOLDER_VISIBILITYOFF" : true,
"PLACEHOLDER_VISIBILITYFALSE" : false,
"STDPLACEHOLDER_SHAPENAME" : 'id89'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.ProductionMode"];
var productionMode = GetTagValueAsInteger(tagName);
var textId = "T02_AT_ProductionMode" + productionMode;
; 
 Text = GetText(textId) + " [" + GetAsString(productionMode) + "]";;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id73'});
new LanguageText({'textID' : 'T02_AT_ProductionMode', 'target': 'id71'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var valveNr = "1";
var tagName = processTags["Valve[" + valveNr + "].hmiIn.release"];
var tagValue = GetTagValueAsInteger(tagName);
var mask = 1;
var active;
if((tagValue & mask) !== 0){
 active = true;
}
else{
 active = false;
}
 var condition = active && AT_Ctrl_Dev;
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id86'});
new emosWS.ESClickWriteBit({'conditionFunction' : function() {
 var valveNr = "1";
var setTag = processTags["Valve[" + valveNr + "].hmiOut.set"];
var releaseTag = processTags["Valve[" + valveNr + "].hmiIn.release"];
var tagValue = GetTagValueAsInteger(releaseTag);
var mask = 1;
var releaseActive;
if((tagValue & mask) !== 0){
 releaseActive = true;
}
else{
 releaseActive = false;
}
; 
 Tag = setTag;
 BitNr = 0;
 Enabled = releaseActive;
return {Tag:Tag, BitNr:BitNr, Enabled:Enabled};
 },
 'PLACEHOLDER_FORCE' : 'Set',
 'PLACEHOLDER_BITMODE' : 'RadioButton_FieldValueToggle',
 'PLACEHOLDER_USESTROKE' : false,
 'PLACEHOLDER_USESHAND' : true,
 'PLACEHOLDER_USESHIDE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id86'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var binNo = "1";
var tagName = processTags["BinSensor[" + binNo + "].hmiIn.ActualState"];
var tagValue = GetTagValueAsBoolean(tagName);
 var condition = tagValue;
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : true,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#E8EBEF',
 'PLACEHOLDER_FILLCOLORFALSE' : '#D9DFE4',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#A5B200',
 'PLACEHOLDER_STROKECOLORFALSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id90'});
new emosWS.ESColorSwapMulti({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
;
 Condition1 = state === 1;;
 Condition2 = state === 2;;
 Condition3 = state === 4;;
 Condition4 = state === 8;;
 Condition5 = state === 0;;
 Condition6 = false;;
 Condition7 = false;;
 Condition8 = false;;
return {Condition1:Condition1, Condition2:Condition2, Condition3:Condition3, Condition4:Condition4, Condition5:Condition5, Condition6:Condition6, Condition7:Condition7, Condition8:Condition8}
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_SWAP_USEELSE' : true,
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : true,
 'PLACEHOLDER_SWAP_VISIBILITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_FILLCOLOR1' : '#D2D2D2',
 'PLACEHOLDER_FILLCOLOR2' : '#24B2EA',
 'PLACEHOLDER_FILLCOLOR3' : '#A5B200',
 'PLACEHOLDER_FILLCOLOR4' : '#FFCC00',
 'PLACEHOLDER_FILLCOLOR5' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR6' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR7' : '#FF0000',
 'PLACEHOLDER_FILLCOLOR8' : '#FF0000',
 'PLACEHOLDER_FILLCOLORELSE' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR1' : '#5D636D',
 'PLACEHOLDER_STROKECOLOR2' : '#A5B200',
 'PLACEHOLDER_STROKECOLOR3' : '#B53030',
 'PLACEHOLDER_STROKECOLOR4' : '#F27019',
 'PLACEHOLDER_STROKECOLOR5' : '#969696',
 'PLACEHOLDER_STROKECOLOR6' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR7' : '#FF0000',
 'PLACEHOLDER_STROKECOLOR8' : '#FF0000',
 'PLACEHOLDER_STROKECOLORELSE' : '#5D636D',
 'PLACEHOLDER_VISIBILITY1' : false,
 'PLACEHOLDER_VISIBILITY2' : false,
 'PLACEHOLDER_VISIBILITY3' : false,
 'PLACEHOLDER_VISIBILITY4' : false,
 'PLACEHOLDER_VISIBILITY5' : false,
 'PLACEHOLDER_VISIBILITY6' : false,
 'PLACEHOLDER_VISIBILITY7' : false,
 'PLACEHOLDER_VISIBILITY8' : false,
 'PLACEHOLDER_VISIBILITYELSE' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id59'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var binNo = "1";
var PCUNumber = configData.General.PCUNumber;
var configName = configData["PCU" + PCUNumber + "_BinSensor" + binNo]["Name"];
; 
 Text = configName;;
 Enabled = true;;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id91'});
new LanguageText({'textID' : 'T02_AT_Druckluft', 'target': 'id2'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
; 
 Text = 'BG No: ' + pcuNr;;
 Enabled = true;;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id78'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var condition = emosWS.isAdmin();
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id78'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
 var condition = !(state === 4 || state === 8);
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id62'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.Function"];
var functionNo = GetTagValueAsInteger(tagName);
var textId = "T02_AT_BGFunction" + functionNo;
; 
 Text = GetText(textId) + " [" + GetAsString(functionNo) + "]";;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id62'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var PCUNumber = configData.General.PCUNumber;
var valveName = configData["PCU" + PCUNumber + "_Valve" + "1"]["Name"];
; 
 Text = valveName;;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id92'});
new emosWS.ESColorSwap({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.state"];
var state = emosWS.fn.modulo(GetTagValueAsInteger(tagName), 10);
 var condition = state === 4 || state === 8;
 return condition;
 },
 'PLACEHOLDER_SWAP_FILLCOLOR' : false,
 'PLACEHOLDER_SWAP_STROKECOLOR' : false,
 'PLACEHOLDER_SWAP_VISIBILITY' : true,
 'PLACEHOLDER_SWAP_USETRUE' : true,
 'PLACEHOLDER_SWAP_USEFALSE' : true,
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_FILLCOLOR' : '#00FF00',
 'PLACEHOLDER_FILLCOLORFALSE' : '#FF0000',
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'PLACEHOLDER_STROKECOLOR' : '#00FF00',
 'PLACEHOLDER_STROKECOLORFALSE' : '#FF0000',
 'PLACEHOLDER_VISIBILITY' : true,
 'PLACEHOLDER_VISIBILITYFALSE' : false,
 'PLACEHOLDER_SWAP_HIDEIFQUALITYBAD' : false,
 'STDPLACEHOLDER_SHAPENAME' : 'id61'});
new emosWS.ESDynamicText({'conditionFunction' : function() {
 var tagName = processTags["Common[1].hmiIn.Function"];
var functionNo = GetTagValueAsInteger(tagName);
var textId = "T02_AT_BGFunction" + functionNo;
; 
 Text = GetText(textId) + " [" + GetAsString(functionNo) + "]";;
 Enabled = true;
return {'Text' : Text, 'Enabled' : Enabled};
 },
 'PLACEHOLDER_SWAP_USEQUALITY' : false,
 'PLACEHOLDER_STROKECOLORQUALITYGOOD' : '#000000',
 'PLACEHOLDER_STROKECOLORQUALITYBAD' : '#FF8000',
 'STDPLACEHOLDER_SHAPENAME' : 'id61'});
}
window.addEventListener("load", initialize, false);
